﻿namespace BlazorApp4.Data
{
    public class Message
    {
            public Message(string username, string body, bool mine)
            {
                Username = username;
                Body = body;
                Mine = mine;
            }

            public string Username { get; set; }
            public string Body { get; set; }
            public bool Mine { get; set; }

            public string Base64 { get; set; }
            // public bool IsNotice { get =>  Body.StartsWith("[Notice]"); public set => IsNotice = value; }

            public bool IsNotice
            {
                get { return Body.StartsWith("[Notice]"); }
                set { }
            }
            public string CSS
            {
                get { return Mine ? "sent" : "received"; }
                set { }
            }
    }
}
